# Define here the models for your scraped items
#
# See documentation in:
# https://docs.scrapy.org/en/latest/topics/items.html

import scrapy
from enum import Enum

SHOP_STATUS = {
  'UNKNOWL': 0,
  'INVALID': 1,
  'VALID': 2
}


class Shop(scrapy.Item):

  shop_name = scrapy.Field()
  shop_id = scrapy.Field()
  shop_url = scrapy.Field()
  shop_log = scrapy.Field()
  shop_type = scrapy.Field()
  
  company_telphone = scrapy.Field()
  company_address = scrapy.Field()
  company_name = scrapy.Field()

  country = scrapy.Field()
  province = scrapy.Field()
  city = scrapy.Field()
  area = scrapy.Field()

  create_time = scrapy.Field()
  screen_shot = scrapy.Field()
  status = scrapy.Field()
  
  
class Product(scrapy.Item):
  
  product_name = scrapy.Field()
  product_url = scrapy.Field()
  product_id = scrapy.Field()
  product_price = scrapy.Field()
  product_classify = scrapy.Field()
  product_desc = scrapy.Field()
  product_img = scrapy.Field()
  product_screenshot = scrapy.Field()
  
  shop_id = scrapy.Field()
  
  create_time = scrapy.Field()


class Product_List(scrapy.Item):
  list = scrapy.Field()


'''
  通用管道包
  将具体的内容包裹在 body中,
  传递自定义数据， 例如 orm 映射类实例
'''
class Pipe_Pk(scrapy.Item):
  body = scrapy.Field()